﻿<%@ Page Title="BetaBooks | Details" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Details.aspx.cs" Inherits="Details" %>
<%@ MasterType virtualPath="~/MasterPage.master"%>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:SqlDataSource ID="BookDetails" runat="server" 
        ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\db.mdb;Persist Security Info=False" 
        ProviderName="System.Data.OleDb" 
        SelectCommand="SELECT * FROM [Books] WHERE ([ISBN] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ISBN" QueryStringField="ISBN" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
  <span class="heading">Book Details</span>
  <table class="contentTable">
        <tr>
            <td style="height:22px;width:20px;background-image:url('images/ictl.png');background-position: top;background-repeat:no-repeat"></td>
            <td style="background-image:url('images/bg.png');"></td>
            <td style="height:22px;width:20px;background-image:url('images/ictr.png');background-position: top;background-repeat:no-repeat"></td>
        </tr>
        <tr class="contentbg">
            <td></td>
            <td>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                DataKeyNames="ISBN" DataSourceID="BookDetails" style="margin-bottom: 0px" 
                Width="100%" GridLines="None" ShowHeader="False" onprerender="GridView1_PreRender">
                <Columns>
                    <asp:TemplateField>
                    
                        <ItemTemplate>
                                 
                            
                              &nbsp;<br />
                              <table style="width:100%;">
                              
                              <tr>
                              
                              <td colspan="3" align="center">
                              
                              <asp:Label ID="Title" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                                  <br />
                                  <asp:Label ID="Edition" runat="server" Text='<%# Eval("Edition") %>'></asp:Label>
                                  &nbsp;Edition<br /><br />
                                  
                              </td>
                              
                              </tr>
                              
                                  <tr>
                                      <td align="center">
                                          <img alt="Front Cover" class="bookImage" 
                                              src='bookImages/<%# Eval("Picture") %>' /></td>
                                      <td align="left">
                                          Author:
                                          <asp:Label ID="Author" runat="server" Text='<%# Eval("Author") %>'></asp:Label>
                                          <br />
                                          <br />
                                          Price:
                                          <asp:Label ID="Price" runat="server" Text='<%# Eval("Price","{0:C}") %>'></asp:Label>
                                          <br />
                                          <br />
                                          Published:
                                          <asp:Label ID="PubDate" runat="server" Text='<%# Eval("PubDate") %>'></asp:Label>
                                          <br />
                                          <br />
                                          <asp:Label ID="Description" runat="server" Text='<%# Eval("Description") %>'></asp:Label>
                                      </td>
                                      <td>
                                          <asp:Button ID="Button" runat="server" cssclass="button" Text="Add To Cart" 
                                            CommandName="addToCart" CommandArgument=<%# Eval("ISBN") %> oncommand="Button_Command" 
                                         />
                                      </td>
                                  </tr>
                          
                                
                              </table>
                              <br />
                       
                        </ItemTemplate>
                        
                    </asp:TemplateField>
                    
                </Columns>
            </asp:GridView>
            </td>
              <td></td>
        </tr>
        <tr>
            <td style="height:22px;width:20px;background-image:url('images/icbl.png');background-position: top;background-repeat:no-repeat"></td>
            <td style="background-image:url('images/bg.png');"></td>
            <td style="height:22px;width:20px;background-image:url('images/icbr.png');background-position: top;background-repeat:no-repeat"></td>
        </tr>
    </table>
    </asp:Content>

